apiVersion: v1
clusters:
- cluster:
    certificate-authority: /etc/kubernetes/pki/ca.pem
    server: https://{% if ansible_default_ipv4.address in groups['master'] %}{{ ansible_default_ipv4.address }}:6443{% elif 'domain_name' in loadbalance %}{{loadbalance.domain_name}}:{{loadbalance.port}}{% else %}{{ loadbalance.ip }}:{{loadbalance.port}}{% endif %}

  name: kubernetes
contexts:
- context:
    cluster: kubernetes
    user: system:kube-controller-manager
  name: system:kube-controller-manager
current-context: system:kube-controller-manager
kind: Config
preferences: {}
users:
- name: system:kube-controller-manager
  user:
    client-certificate: /etc/kubernetes/pki/controller-manager.pem
    client-key: /etc/kubernetes/pki/controller-manager.key
